/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.address.remote.RemoteGenerateAddressServiceImpl
   Module Description   :

   Date Created      : 2010/3/18
   Original Author   : feeling.wang
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.address.remote;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.yaodian100.ec.member.service.AddessService;

/**
 * @author feeling.wang
 * 
 */
public class RemoteGenerateAddressServiceImpl implements RemoteGenerateAddressService {
	private static Logger logger = LoggerFactory.getLogger(RemoteGenerateAddressServiceImpl.class);
	@Autowired
	private AddessService addressService;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.yaodian100.ec.address.remote.RemoteGenerateAddressService#generateAddress(java.lang.String)
	 */
	@Override
	public boolean generateAddress(String date) {
		try {
			addressService.generateAddressV2();
			return true;
		} catch (Exception e) {
			return false;
		}
	}

	@Override
	public boolean generateAddressForMidend(String date) {
		try {
			addressService.generateAddressForMidend();
			return true;
		} catch (Exception e) {
			return false;
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.yaodian100.ec.address.remote.RemoteGenerateAddressService#generateAddressForCod(java.lang.String)
	 */
	@Override
	public boolean generateAddressForCod(String date) {
		try {
			addressService.generateAddressForCod();
			return true;
		} catch (Exception e) {
			return false;
		}
	}

	@Override
	public boolean generateAddressForServiceSupport(String date) {
		try {
			addressService.generateAddressForServiceSupport();
			return true;
		} catch (Exception e) {
			return false;
		}
	}

}
